#include "stdafx.h"
#include "LayoutDivExample.h"

void LayoutDivExample::loadFile(const String& fileName, FCView *view){
    FCUIXml::loadFile(fileName, view);
    //获取第二页
   FCTabPage *tabPage = getTabPage(L"TabPage2");
   FCLayoutDiv *layoutDiv = new FCLayoutDiv();
    FCPoint point = {50, 50};
   layoutDiv->setLocation(point);
    FCSize size = {250, 100};
   layoutDiv->setSize(size);
   layoutDiv->setShowHScrollBar(true);
   tabPage->addView(layoutDiv);
   for (int i = 0; i < 10; i++)
   {
       FCButton *button = new FCButton();
       FCSize size2 = {100, 20};
       button->setSize(size2);
       layoutDiv->addView(button);
       button->setText(L"Button");
   }
}
